package cn.kgc.vuehangbanhou.controller;

import cn.kgc.vuehangbanhou.pojo.City;
import cn.kgc.vuehangbanhou.pojo.ResultEntity;
import cn.kgc.vuehangbanhou.service.CityService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
public class CityController {

    @Resource
    CityService cityService;
    @RequestMapping("/seleCity")
    public ResultEntity<List<City>> seleCity(){
        List<City> sele = cityService.sele();
        return ResultEntity.successWithoutData(sele);
    }
}
